package com.dubbo.user.consumer;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.dubbo.order.api.IOrderService;
import com.dubbo.order.api.Requests;
import com.dubbo.order.api.Responses;

/**
 * Hello world!
 *  服务调用者
 */

public class App 
{
	public static void main( String[] args ) throws IOException {
        ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("order-consumer.xml");

        //用户下单过程
        IOrderService services=(IOrderService)context.getBean("orderServices1");

        Requests request=new Requests();
        request.setName("mic");
        Responses response=services.orderSome(request);

        System.out.println(response.toString());

        System.in.read();

    }
}
